1da5781833fea90964ea7ecb6ab1de990bc06a90,codeInsight/impl/com/intellij/codeInsight/javadoc/JavaDocManager.java,JavaDocManager,doFetchDocInfo,#JavaDocInfoComponent#JavaDocProvider#boolean#,517

Before Change


        });
      }
    }, 600);
    myUpdateDocAlarm.addRequest(new Runnable() {
      public void run() {
        ApplicationManager.getApplication().runReadAction(new Runnable() {
          public void run() {
            final String text = provider.getJavaDoc();
            if (text == null) {
              component.setText(CodeInsightBundle.message("no.documentation.found"), true);
            }
            else if (text.length() == 0) {
              component.setText(component.getText(), true);
            }
            else {
              component.setData(provider.getElement(), text);
            }
          }
        });
      }
    }, 10);
  }

  public String getDocInfo(PsiElement element) {

After Change


        }
      }
    });
    myUpdateDocAlarm.addRequest(new Runnable() {
      public void run() {
        ApplicationManager.getApplication().runReadAction(new Runnable() {
          public void run() {
            final String text;
            try {
              text = provider.getJavaDoc();
            }
            catch (final Exception e) {
              SwingUtilities.invokeLater(new Runnable(){
                public void run() {
                  component.setText(CodeInsightBundle.message("javadoc.external.fetch.error.message", e.getLocalizedMessage()), true);
                }
              });
              return;
            }
            SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                if (text == null) {
                  component.setText(CodeInsightBundle.message("no.documentation.found"), true);
                }
                else if (text.length() == 0) {
                  component.setText(component.getText(), true);
                }
                else {
                  component.setData(provider.getElement(), text);
                }

                final Dimension dimension = component.getPreferredSize();
                final Window window = SwingUtilities.getWindowAncestor(component);
                if (window != null) {
                  window.setBounds(window.getX(),
                                   window.getY(),
                                   dimension.width,
                                   dimension.height);
                  window.validate();
                  window.repaint();
                }
              }
            });
          }
        });
      }
    }, 10);
  }

  private String getDocInfo(PsiElement element) throws Exception {